package sharemem

const (
	BATTLE_PARAM_MAX1 = 5//一维上限
	BATTLE_PARAM_MAX2 = 8//二维上限
)

type SkillEffect struct {
	Id				int32
	Target			int8
	Ctype			bool
	Condition		[BATTLE_PARAM_MAX1][BATTLE_PARAM_MAX2]int32
	Tag				int32
	Begin_time		int32
	End_time		int32
	Param1			[BATTLE_PARAM_MAX1][BATTLE_PARAM_MAX2]int32
	Param2			[BATTLE_PARAM_MAX1][BATTLE_PARAM_MAX2]int32
	Param3			int32
	Param4			int32
	Param5			int32
	Param6			[BATTLE_PARAM_MAX1]int32
}

func (tmp *SkillEffect) meminit() {
	var i,j int32
	tmp.Id = 0
	tmp.Target = 0
	tmp.Ctype = true
	for i = 0; i < BATTLE_PARAM_MAX1; i++ {
		for j=0;j<BATTLE_PARAM_MAX2;j++ {
			tmp.Condition[i][j] = 0
		}
	}
	tmp.Tag	= 0
	tmp.Begin_time = 0
	tmp.End_time = 0
	for i = 0; i < BATTLE_PARAM_MAX1; i++ {
		for j=0;j<BATTLE_PARAM_MAX2;j++ {
			tmp.Param1[i][j] = 0
		}
	}
	for i = 0; i < BATTLE_PARAM_MAX1; i++ {
		for j=0;j<BATTLE_PARAM_MAX2;j++ {
			tmp.Param2[i][j] = 0
		}
	}
	tmp.Param3 = 0
	tmp.Param4 = 0
	tmp.Param5 = 0
	for i=0;i<BATTLE_PARAM_MAX1;i++ {
		tmp.Param6[i] = 0
	}
}
func (tmp *SkillEffect) isUse() bool {
	return tmp.Id > 0
}
func (tmp *SkillEffect) getId() int32 {
	return tmp.Id
}

func Get_config_skill_effect(id int32) *SkillEffect {
	v, ok := GetConfigSkillEffectMap()[id]
	if !ok {
		return nil
	}

	return v
}
